#ifndef HORBARCHART_H
#define HORBARCHART_H

#include <QWidget>
#include <QtCharts>
#include <QVector>
#include <QScopedPointer>
#include <QtCharts/QBarSet>
#include <QtCharts/QHorizontalBarSeries>
#include "src/device/Handle/HandleHelper.h"




using namespace QtCharts;
namespace Ui {
class HorBarChart;
}

class HorBarChart : public QWidget
{
    Q_OBJECT

public:
    explicit HorBarChart(QWidget *parent = 0);
    ~HorBarChart();

    void initUI();
    void flushData(double*);
private slots:
    void on_theme_currentIndexChanged(int index);



    void on_next_clicked();

signals:
    void updateChart(int index);

private:
    Ui::HorBarChart *ui;
    QChart *chart;
    QScopedPointer<QBarSet> curSerial;
};

#endif // HORBARCHART_H
